Skip to content

Use C++20 for KvikIO main library#819

Merged
rapids-bot[bot] merged 2 commits intorapidsai:branch-25.10from
kingcrimsontianyu:fix-cpp-20
Sep 12, 2025
Merged

Use C++20 for KvikIO main library#819
rapids-bot[bot] merged 2 commits intorapidsai:branch-25.10from
kingcrimsontianyu:fix-cpp-20

Conversation

@kingcrimsontianyu
Copy link
Contributor

@kingcrimsontianyu kingcrimsontianyu commented Sep 11, 2025

Previous PR #749 forgets to bring the entrée to the table: Only the C++ code in tests and benchmarks use C++20, but not the main library. This PR fixes this oversight.

@kingcrimsontianyu kingcrimsontianyu added non-breaking Introduces a non-breaking change c++ Affects the C++ API of KvikIO labels Sep 11, 2025
@copy-pr-bot
Copy link

copy-pr-bot bot commented Sep 11, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@kingcrimsontianyu
Copy link
Contributor Author

/ok to test 83283ab

@kingcrimsontianyu kingcrimsontianyu added the improvement Improves an existing functionality label Sep 11, 2025
@kingcrimsontianyu kingcrimsontianyu marked this pull request as ready for review September 11, 2025 16:00
@kingcrimsontianyu kingcrimsontianyu requested a review from a team as a code owner September 11, 2025 16:00
@kingcrimsontianyu
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit d637c6e into rapidsai:branch-25.10 Sep 12, 2025
77 checks passed
rapids-bot bot pushed a commit that referenced this pull request Sep 15, 2025
## Background

`libcurl` have two path parameters related to the certificate authority (CA):

- `CURLOPT_CAINFO`, which specifies the CA bundle file path.
- `CURLOPT_CAPATH`, which specifies the directory of individual CA certificates with hash-based naming.

The default paths are determined at compile-time, which can cause issues if the Linux distributions where `libcurl` is built and run are different (e.g. on Rocky Linux vs Ubuntu as in our CI vs our lab system), and the certificates files are likely at different locations. This problem has been observed in KvikIO's wheel distribution, where HTTPS would fail with the message:

>error setting certificate verify locations:  CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: /etc/ssl/certs

## This PR

This PR addresses this problem. The certificate path is now explicitly searched for in the following order. The compile-time parameters, if any, are still used but treated with lowest priority.

- CA bundle file: Check env vars `CURL_CA_BUNDLE`, and `SSL_CERT_FILE`
- CA directory: Check env vars `SSL_CERT_DIR`
- CA bundle file: Search a set of distribution-specific locations for accessible bundle
- CA directory: Search a set of distribution-specific locations for accessible directory
- CA bundle file: Check if the compile-time path is given and accessible  
- CA directory: Check if the compile-time parameter is given and accessible

Depends on #819 for the use of  `static` structured binding which is only available in C++ >=20
 
Closes #711

Authors:
  - Tianyu Liu (https://github.com/kingcrimsontianyu)

Approvers:
  - Mads R. B. Kristensen (https://github.com/madsbk)

URL: #817
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Affects the C++ API of KvikIO improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants